//
//  GHFormView.m
//  GodHorses
//
//  Created by Mac on 2017/11/23.
//  Copyright © 2017年 stoneobs@icloud.com. All rights reserved.
//

#import "GHFormView.h"

@implementation GHFormView

- (instancetype)initWithFrame:(CGRect)frame leftTitle:(NSString *)leftTitle leftTitleColor:(UIColor *)leftTitleColor rightTitle:(NSString *)rightTitle rightTitleColor:(UIColor *)rightTitleColor{
    
    if (self == [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor whiteColor];
        self.textLabel = [[STLabel alloc] initWithFrame:CGRectMake(10, 0, 100, self.height)
                                                   text:leftTitle
                                              textColor:leftTitleColor
                                                   font:14
                                            isSizetoFit:NO
                                          textAlignment:NSTextAlignmentLeft];
        [self addSubview:self.textLabel];
        self.detailLabel = [[STLabel alloc] initWithFrame:CGRectMake(10, 0, UIScreenWidth - 140, self.height)
                                                   text:rightTitle
                                              textColor:rightTitleColor
                                                   font:14
                                            isSizetoFit:NO
                                          textAlignment:NSTextAlignmentRight];
        self.detailLabel.right = UIScreenWidth - 10;
        [self addSubview:self.detailLabel];
    }
    return self;
}

@end
